using System;
using System.ServiceModel;


namespace Agron.Services.Contracts
{
    /// <summary>
    /// Defines the contract for the <c>Broadcasting Service</c>.
    /// </summary>
    [ServiceContract(CallbackContract = typeof(IBroadcastingServiceEvents), SessionMode = SessionMode.Required,
        Namespace = "http://services.udlap.mx/Agron/BroadcastingService.svc")]
    public interface IBroadcastingService
    {
        /// <summary>
        /// Subscribes a caller to the Broadcasting Service host.
        /// </summary>
        [OperationContract(IsOneWay = false, IsInitiating = true)]
        void Subscribe();

        /// <summary>
        /// Unsubscribes a caller from the Broadcasting Service host.
        /// </summary>
        [OperationContract(IsOneWay = false, IsTerminating = true)]
        void Unsubscribe();

        /// <summary>
        /// Notifies that the mouse's left button is up.
        /// </summary>
        /// <param name="x">An <see cref="Int32"/> that contains the x-coordinate of the mouse when the event happened.</param>
        /// <param name="y">An <see cref="Int32"/> that contains the y-coordinate of the mouse when the event happened.</param>
        [OperationContract(IsOneWay = false)]
        void NotifyLeftButtonDown(int x, int y);

        /// <summary>
        /// Notifies that the mouse's left button is up.
        /// </summary>
        /// <param name="x">An <see cref="Int32"/> that contains the x-coordinate of the mouse when the event happened.</param>
        /// <param name="y">An <see cref="Int32"/> that contains the y-coordinate of the mouse when the event happened.</param>
        [OperationContract(IsOneWay = false)]
        void NotifyLeftButtonUp(int x, int y);

        /// <summary>
        /// Notifies that the mouse has moved its position.
        /// </summary>
        /// <param name="x">An <see cref="Int32"/> that contains the x-coordinate of the mouse when the event happened.</param>
        /// <param name="y">An <see cref="Int32"/> that contains the y-coordinate of the mouse when the event happened.</param>
        [OperationContract(IsOneWay = false)]
        void NotifyMove(int x, int y);

        /// <summary>
        /// Notifies that the mouse's right button is down.
        /// </summary>
        /// <param name="x">An <see cref="Int32"/> that contains the x-coordinate of the mouse when the event happened.</param>
        /// <param name="y">An <see cref="Int32"/> that contains the y-coordinate of the mouse when the event happened.</param>
        [OperationContract(IsOneWay = false)]
        void NotifyRightButtonDown(int x, int y);

        /// <summary>
        /// Notifies that the mouse's right button is up.
        /// </summary>
        /// <param name="x">An <see cref="Int32"/> that contains the x-coordinate of the mouse when the event happened.</param>
        /// <param name="y">An <see cref="Int32"/> that contains the y-coordinate of the mouse when the event happened.</param>
        [OperationContract(IsOneWay = false)]
        void NotifyRightButtonUp(int x, int y);
    }
}
